from django import forms
from django.contrib.auth import get_user_model
from .models import Blog


class BlogForm(forms.Form):
        title = forms.CharField(max_length=200,min_length=2, error_messages = {
                'required':True,
                'max_length':'密码长度在2-200之间',
                'min_length':'密码长度在2-200之间',
        })
        category = forms.IntegerField()
        content = forms.CharField(error_messages = {
                'required':True,
        })